import { NestFactory } from '@nestjs/core';
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';

export const SwaggerDocument = (app) => {
    const options = new DocumentBuilder()
        .setTitle('swagger-template')
        .setDescription('The cats API description')
        .setVersion('1.0')
        .addTag('cats')
        .build();
    const document = SwaggerModule.createDocument(app, options);

    SwaggerModule.setup('/', app, document);
}